package com.lgy.httpmocktool.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 数据库连接配置
 */
@Component
public class DataBaseConfig {
    private static String dbUrl;
    private static String driverName;
    @Value("${spring.datasource.url}")
    private void setDbUrl(String dbUrl) {
        DataBaseConfig.dbUrl = dbUrl;
    }
    @Value("${spring.datasource.driver-class-name}")
    private void setDriverName(String driverName) {
        DataBaseConfig.driverName = driverName;
    }
    public static String getDbUrl() {
        return dbUrl;
    }
    public static String getDriverName() {
        return driverName;
    }

}
